/*用while语句实现10个数求和*/
#include<stdio.h>

int main(void) {
    int number, i, sum;
    sum = 0;
    printf("请输入10个整数:\n");
    i = 1;

    while (i <= 10) {
        printf("请输入第%d个整数:", i);
        scanf("%d", &number);
        sum = sum + number;
        i++;
    }

    printf("%d\n", sum);
    return 0;
}
